/*
 * PopupThreadStartWidget.hpp
 *
 *  Created on: Jul 11, 2012
 *      Author: guillou
 */

#ifndef POPUPTHREADSTARTWIDGET_HPP_
#define POPUPTHREADSTARTWIDGET_HPP_

#include <PopupLibTypes.hpp>
#include <ui_threadstartwidget.h>
#include <string>
#include <vector>

class PopupUsersWidget;

class PopupThreadStartWidget : public QWidget, private Ui_ThreadStartWidget
{
  Q_OBJECT

public:

  enum Mode {
    MODE_DEFAULT,
    MODE_CANVASS
  };

  PopupThreadStartWidget(QWidget *parent);
  virtual ~PopupThreadStartWidget() {}
  inline QPushButton *startButton() { return m_startBtn; }

  bool validate();
  Mode getMode() const;
  void getNewThreadInfo(QString & p_threadTitle,
                        Popup::UserList & p_threadAttendants);
  void getNewCanvassInfo(Popup::Canvass & p_canvass);

private slots:
  void slot_setupWidget(int mode);
  void slot_canvassAddChoice();
  void slot_canvassDeleteChoice();

private:
  PopupUsersWidget *m_usersWidget;
};

#endif /* POPUPTHREADSTARTWIDGET_HPP_ */
